﻿using System;
using InterfaceWeaver.AopCore;

namespace InterfaceWeaver.CustomTool
{
    public static class AspectConfiguration
    {
        /// <summary>
        /// Gets the default attribute types.
        /// </summary>
        /// <returns></returns>
        public static Type[] GetDefaultAttributeTypes()
        {
            return new[]
                {
                    typeof(HookSpecificPropertySetAttribute),
                    typeof(HookGenericPropertySetAttribute),
                    typeof(AddPropertyNameConstantAttribute)
                };
        }

        /// <summary>
        /// Gets the registered aspect handlers.
        /// </summary>
        /// <returns></returns>
        public static IAspectHandler[] GetRegisteredAspectHandlers()
        {
            return new IAspectHandler[]
                {
                    new MapCommandAspectHandler(),
                    new MapDependencyPropertyAspectHandler(),
                    new CheckSetterHasChangesAspectHandler(),
                    new ImplementINotifyPropertyChangedAspectHandler(),
                    new GenericSkipAspectHandler(),
                    new DefaultValueAspectHandler(),
                    new ImplementICloneableAspectHandler(),
                    new HookPropertySetAspectHandler(),
                    new InheritAspectHandler(),
                    new AddPropertyNameConstantAspectHandler(),
                    new ImplementIEditableObjectAspectHandler(),
                    new MapDefaultInstanceAspectHandler(),
                    new ReadonlyAspectHandler(),
                    new WeaverOptionsAspectHandler()
                };
        }
    }
}
